import React, { useEffect, useState } from "react";
import { View } from '@tarojs/components'
import './index.scss'
const ToolBox = (props) => {
    const { content } = props
    const [visible, setVisible] = useState(false)
    useEffect(() => {
        if (visible) {
            setTimeout(() => { setVisible(false) }, 5000)
        }
    }, [visible])
    return <View onClick={() => setVisible(!visible)} className="ToolBox_box">
        {visible && <>
            <View className="ToolBox_content_box">
                {content}
                <View className="ToolBox_content_radio"></View>


            </View>
        </>}

    </View>
}
export default ToolBox